package com.lagou.edu.controller;

import com.lagou.edu.service.CodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangjinshan
 * @version 1.0
 * @description
 * @date 2021/8/25 下午9:29
 */
@RestController
public class CodeController {

    @Autowired
    private CodeService codeService;

    /**
     * 生成并发送邮件
     * @param email
     * @return
     */
    @GetMapping("/create/{email}")
    public boolean create(@PathVariable(name = "email") String email){
        return codeService.create(email);
    }
}
